Welcome to the PS2010 Code Bank. Here you will find a collection of the R code used for all data analyses covered across the module. Use the menu on the left hand side to navigate.
Change NULL to the name of the package.
Change NULL to the folder path.
Remember you can also set the working directory using the menu options:
Session -> Set Working Directory -> Choose Directory
mydata is the object that we save the data under. You
can call it whatever you like.
Change NULL to the name of the file.
Remember to add “.csv” at the end of the filename.
R only reads .csv data files.
Note: read_csv() requires the tidyverse package.